<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::group(['namespace'=>'App'], function () {

        //********************权限模块*****************//
        //管理员管理
        Route::get('admin/list', 'AdminController@adminList');//管理员展示
        Route::post('admin/add', 'AdminController@adminAdd');//管理员添加
        Route::post('admin/edit', 'AdminController@adminEdit');//管理员编辑
        Route::post('admin/delete', 'AdminController@adminDelete');//管理员删除
        Route::get('admin/roleLook', 'AdminController@adminRoleLook');//管理员角色查看
        Route::get('admin/roleList', 'AdminController@adminRoleList');//管理员角色列表
        Route::post('admin/roleEdit', 'AdminController@adminRoleEdit');//管理员角色列表
        Route::post('admin/roleEdit', 'AdminController@adminRoleEdit');//管理员角色列表
        Route::get('admin/one', 'AdminController@adminOne');//单个管理员数据

        Route::get ('admins/tests','AdminController@test');//ceshi
        //角色管理 
        Route::get('role/list', 'RoleController@roleList');//角色列表
        Route::get('role/actionList', 'RoleController@roleActionList');//角色权限列表
        Route::post('role/add', 'RoleController@roleAdd');//角色添加
        Route::post('role/actionEdit', 'RoleController@roleActionEdit');//角色权限编辑
        Route::post('role/delete', 'RoleController@roleDelete');//角色删除
        Route::get('role/one', 'RoleController@roleOne');//单个角色数据
        //权限管理
        Route::get('action/list', 'ActionController@actionList');//权限列表
        Route::post('action/add', 'ActionController@actionAdd');//权限列表
        Route::post('action/edit', 'ActionController@actionEdit');//权限信息编辑
        Route::post('action/delete', 'ActionController@actionDelete');//权限信息删除
        //部门管理
        Route::get('depart/list', 'DepartmentController@departList');//部门列表
        Route::post('depart/add', 'DepartmentController@departAdd');//部门添加
        Route::post('depart/edit', 'DepartmentController@departEdit');//部门编辑
        Route::post('depart/delete', 'DepartmentController@departDelete');//部门删除
        Route::post('depart/delete', 'DepartmentController@departDelete');//部门角色查看
        Route::get('depart/one', 'DepartmentController@departOne');//单个部门数据
        Route::get('depart/roleLook', 'DepartmentController@departRoleLook');//部门角色查看
        Route::get('depart/roleList', 'DepartmentController@departRoleList');//部门角色列表
        Route::post('depart/roleEdit', 'DepartmentController@departRoleEdit');//部门角色编辑



        // 商品模块
        Route::post('goods/create', 'GoodsController@create');//商品添加
        Route::get('goods/showparam', 'GoodsController@showParam');//添加商品前获取参数
        Route::get('goods/show', 'GoodsController@show');//查询商品
        Route::post('goods/edit', 'GoodsController@edit');//修改商品
        Route::post('goods/shelves', 'GoodsController@shelves');//商品上下架
        Route::post('goods/editgood', 'GoodsController@editGood');//商品编辑
        Route::get('goods/detail', 'GoodsController@detail');//商品详情
        Route::post('goods/sort', 'GoodsController@sort');//排序

        // 商品品牌模块
        Route::post('brand/create', 'BrandController@create');//品牌添加
        Route::get('brand/show', 'BrandController@show');//品牌展示
        Route::post('brand/edit', 'BrandController@edit');//品牌修改

        // 商品分类模块
        Route::post('type/create', 'GoodsTypeController@create');//分类添加
        Route::get('type/show', 'GoodsTypeController@show');//查询分类
        Route::post('type/edit', 'GoodsTypeController@edit');//修改分类
        Route::get('type/toptype', 'GoodsTypeController@topType');//获取顶级分类
        Route::post('type/sellgood', 'GoodsTypeController@sellGood');//根据分类上下架商品

        // 供货商模块
        Route::post('supplier/create', 'SupplierController@create');//添加供货商
        Route::get('supplier/show', 'SupplierController@show');//查看供货商列表
        Route::post('supplier/edit', 'SupplierController@edit');//更新供货商

        // 银行类型管理
        Route::get('cardType/list',   'CardTypeController@cardTypeList');//类型列表
        Route::post('cardType/add',    'CardTypeController@cardTypeAdd');//类型添加
        Route::post('cardType/update', 'CardTypeController@cardTypeUpdate');//类型更新
        Route::post('cardType/status', 'CardTypeController@cardTypeStatus');//类型更新

        // 店铺模块
        Route::post('shop/add', 'ShopController@shopAdd');//商品添加
        Route::get('shop/list', 'ShopController@shopList');//商铺列表
        Route::post('shop/edit', 'ShopController@shopEdit');//店铺编辑
        Route::post('shop/delete', 'ShopController@shopDelete');//店铺删除
        Route::get('shop/one', 'ShopController@shopOne');//店铺详情

        //提现模块
        Route::get('withdr/list', 'WithdrController@withdrList');//提现申请列表
        Route::post('withdr/status', 'WithdrController@withdrStatus');//提现申请状态改变
        Route::get('withdr/one', 'WithdrController@withdrOne');//提现表数据
        //报表
        Route::get('report/list', 'ReportController@reportList');//报表列表
        Route::get('report/info', 'ReportController@getInfoList');//报表详情
        Route::post('report/status', 'ReportController@changeStatus');//改变状态

        //登录
        Route::post('login/login',  'LoginController@login');//登录
        Route::post('login/out',    'LoginController@out');//登录
        Route::post('login/view',function () {
            return view('welcome');
        });//登录


        // 平台用户资金流水模块
        Route::get('user/userList',     'UserBalanceServerLogController@userList');//会员列表
        Route::get('user/userInfo',     'UserBalanceServerLogController@userInfo');//会员信息详情
        Route::post('user/userUpdate',  'UserBalanceServerLogController@userUpdate');//会员信息更新
        Route::get('user/balanceLog',   'UserBalanceServerLogController@balanceLog');//用户平台资金流水
        Route::get('user/serverList',   'UserBalanceServerLogController@serverList');//所有平台资金流水
        Route::get('shop/list',         'ShopController@shopList');//商铺列表
        Route::post('shop/edit',        'ShopController@shopEdit');//店铺编辑
        Route::post('shop/delete',      'ShopController@shopDelete');//店铺删除
        Route::get('shop/balanceLog',   'ShopController@balanceLog');//用户商户端资金流水

        //用户平台体现模块
        Route::get ('widthdraw/list',    'WidthdrawSystemController@widthdrawList');//个人提现列表
        Route::post('widthdraw/checking','WidthdrawSystemController@withdrawCheck');//提现状态审核中
        Route::post('widthdraw/ok',      'WidthdrawSystemController@withdrawOk');//提现状态通过
        Route::post('widthdraw/false',   'WidthdrawSystemController@withdrawFalse');//提现状态失败
        Route::get ('widthdraw/excel',   'WidthdrawSystemController@excel');//提现记录前一天导出
        Route::get ('widthdraw/excelMore','WidthdrawSystemController@excel');//提现记录前N天导出


        //支付管理模块
        Route::post ('pay/save',    'PayController@paySave');//支付添加
        Route::get ('pay/savetwo',  'PayController@paySave');//支付添加
        Route::get ('pay/list',     'PayController@payList');//支付信息
        Route::post ('pay/status',  'PayController@changeStatus');//支付状态更改


        //查看商户队列
        Route::get ('bfLines/list',       'BfLinesController@bfLins'); //商户队列列表

        // 订单模块
        Route::get('order/show', 'OrderController@show');//展示订单
        Route::post('order/edit', 'OrderController@edit');//发货


        // 队列商品模块
        Route::get('wares/lists',   'WaresController@lists');           // 商品列表
        Route::get('wares/assss',   'WaresController@asass');           // 预留
        Route::get('wares/assss',   'WaresController@asass');           // 预留

        // 队列列表
        Route::get('lines/linesLists',  'LinesController@linesLists');      // 队列订单列表
        Route::get('lines/queueInfo',   'LinesController@queueInfo');       // 队列详情
        Route::get('lines/assss',   'LinesController@asass');           // 预留

        //banner图管理
        Route::get('banner/list',   'BannerController@bannerList');      // banner图列表
        Route::post('banner/add',   'BannerController@bannerAdd');       // banner图添加
        Route::get('banner/info',   'BannerController@bannerInfo');      // banner图详情
        Route::post('banner/update', 'BannerController@bannerUpdate');    // banner图更新
        Route::post('banner/status', 'BannerController@bannerStatus');    // banner图状态
        Route::post('banner/delete', 'BannerController@bannerDelete');    // banner图删除
        Route::post('banner/order',  'BannerController@bannerOrder');     // banner图排序

        // oss
        Route::get('oss/web',  'OssController@getWebKey'); //  获取web直传key
        Route::get('oss/key', 'OssController@getkey');//获取临时key

        //文章模块
        Route::post('article/add_cate', 'ArticleController@add_cate');    // 添加修改分类
        Route::post('article/add_label', 'ArticleController@add_label');    // 添加修改标签
        Route::post('article/del_cate', 'ArticleController@del_cate');    // 删除分类
        Route::post('article/del_label', 'ArticleController@del_label');    // 删除标签
        Route::post('article/add_detail', 'ArticleController@add_detail');    // 添加修改文章
        Route::get('article/detail', 'ArticleController@detail');    // 获取文章详情
        Route::get('article/list', 'ArticleController@list');    // 文章列表
        Route::post('article/del_detail', 'ArticleController@del_detail');    // 删除文章
        Route::get('article/cate_detail', 'ArticleController@cate_detail');    // 获取分类详情
        Route::get('article/cate_list', 'ArticleController@cate_list');    // 分类列表

        //获得菜单
        Route::get('home/menu', 'HomeController@HomeMenu');

        // 数据字典
        Route::get('dictionary/show', 'DictionaryController@show'); //查询数据字典
        Route::post('dictionary/create', 'DictionaryController@create');//添加数据字典
        Route::post('dictionary/edit', 'DictionaryController@edit');//修改数据字典
        Route::post('dictionary/del', 'DictionaryController@del');// 删除

        // 系统信息
        Route::get('sys/show', 'SytemController@show'); //展示分配比例
        Route::post('sys/edit', 'SytemController@edit'); //修改分配比例
        Route::get('sys/moneylog', 'SytemController@moneyLog'); //系统金额日志
        Route::get('sys/pagenum', 'SytemController@pageMum'); //每页多少条

        // 验证
        Route::get('check/code', 'GoodsController@checkCode'); //验证国际条形码是否存在
        Route::get('check/brand', 'BrandController@checkBrand'); //验证品牌是否存在

        Route::get('queue/quLists', 'QueueController@quLists'); // 队列列表
        Route::post('queue/upQueue', 'QueueController@upQueue'); // 队列编辑

});